Skip to content

[quality] fix: correct 4 drifted test assertions in _shared/__tests__#19749

Open
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
quality/fix-shared-test-assertions
Open

[quality] fix: correct 4 drifted test assertions in _shared/__tests__#19749
kubestellar-hive[bot] wants to merge 1 commit into
mainfrom
quality/fix-shared-test-assertions

Conversation

@kubestellar-hive

Copy link
Copy Markdown
Contributor

Fixes 4 persistent test failures exposed by #19741. PR #19748 was insufficient.

Fixes #19745


Filed by quality agent (hold-gated mode).

Copilot AI review requested due to automatic review settings June 26, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot can't review bot-authored pull requests automatically. A user with Copilot access can request a review manually.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Jun 26, 2026
@netlify

netlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deploy Preview for kubestellarconsole ready!

Name Link
🔨 Latest commit 94bf728
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/6a409fa64a07800008cd6a90
😎 Deploy Preview https://deploy-preview-19749.console-deploy-preview.kubestellar.io
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@github-actions

Copy link
Copy Markdown
Contributor

👋 Hey @kubestellar-hive[bot] — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-hive kubestellar-hive Bot added hold Blocked — do not touch quality testing labels Jun 26, 2026
@github-actions github-actions Bot added the ai-generated Pull request generated by AI label Jun 26, 2026
@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 26, 2026
@kubestellar-hive kubestellar-hive Bot force-pushed the quality/fix-shared-test-assertions branch 9 times, most recently from 486ed34 to e342269 Compare June 28, 2026 02:12

@ZachDreamZ ZachDreamZ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4 fixes all look correct:

  • analytics-dashboard: mockImplementation avoids Response body double-consumption
  • core-utils: mockStoreList setup needed to reach store.set path; mockRejectedValueOnce x2 matches expected retry count
  • fetchWithTimeout: 204 null-body per HTTP spec
  • rate-limit: maxRequests=5 matches actual blob count across pages

CI failures are pre-existing (color contrast, Playwright flakiness) — unrelated to test assertion fixes. LGTM.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@ZachDreamZ: changing LGTM is restricted to collaborators

Details

In response to this:

4 fixes all look correct:

  • analytics-dashboard: mockImplementation avoids Response body double-consumption
  • core-utils: mockStoreList setup needed to reach store.set path; mockRejectedValueOnce x2 matches expected retry count
  • fetchWithTimeout: 204 null-body per HTTP spec
  • rate-limit: maxRequests=5 matches actual blob count across pages

CI failures are pre-existing (color contrast, Playwright flakiness) — unrelated to test assertion fixes. LGTM.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

1. analytics-dashboard: Return fresh Response per call to prevent
   'Body already read' error from parallel runReport() invocations
2. fetchWithTimeout: Use null body for HTTP 204 (null-body status)
3. core-utils: Add explicit mockStoreList reset in 'fails closed' test
   to prevent implementation leak from previous test via vi.clearAllMocks()
4. rate-limit: Change maxRequests from 4 to 5 so 4 paginated entries
   don't trigger >= threshold (tests counting, not limiting)

Also fixes unhandled rejection from persistent mockRejectedValue by
using mockRejectedValueOnce for the exact retry count.

Signed-off-by: Quality Agent <quality-agent@kubestellar.io>
@kubestellar-hive kubestellar-hive Bot force-pushed the quality/fix-shared-test-assertions branch from e342269 to 94bf728 Compare June 28, 2026 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull request generated by AI dco-signoff: yes Indicates the PR's author has signed the DCO. hold Blocked — do not touch quality size/S Denotes a PR that changes 10-29 lines, ignoring generated files. testing tier/1-lightweight

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] 4 pre-existing test failures now visible after vitest include pattern fix

2 participants